﻿using System;

namespace HslCommunication.Core.IMessage
{
	/// <summary>
	/// 用于和 AllenBradley PLC 交互的消息协议类
	/// </summary>
	// Token: 0x0200014D RID: 333
	public class AllenBradleyMessage : INetMessage
	{
		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.ProtocolHeadBytesLength" />
		// Token: 0x170005B3 RID: 1459
		// (get) Token: 0x06001CC9 RID: 7369 RVA: 0x0008CD4C File Offset: 0x0008AF4C
		public int ProtocolHeadBytesLength
		{
			get
			{
				return 24;
			}
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.GetContentLengthByHeadBytes" />
		// Token: 0x06001CCA RID: 7370 RVA: 0x0008CD50 File Offset: 0x0008AF50
		public int GetContentLengthByHeadBytes()
		{
			return (int)BitConverter.ToUInt16(this.HeadBytes, 2);
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.CheckHeadBytesLegal(System.Byte[])" />
		// Token: 0x06001CCB RID: 7371 RVA: 0x0008CD5E File Offset: 0x0008AF5E
		public bool CheckHeadBytesLegal(byte[] token)
		{
			return true;
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.GetHeadBytesIdentity" />
		// Token: 0x06001CCC RID: 7372 RVA: 0x00047BE1 File Offset: 0x00045DE1
		public int GetHeadBytesIdentity()
		{
			return 0;
		}

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.HeadBytes" />
		// Token: 0x170005B4 RID: 1460
		// (get) Token: 0x06001CCD RID: 7373 RVA: 0x0008CD61 File Offset: 0x0008AF61
		// (set) Token: 0x06001CCE RID: 7374 RVA: 0x0008CD69 File Offset: 0x0008AF69
		public byte[] HeadBytes { get; set; }

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.ContentBytes" />
		// Token: 0x170005B5 RID: 1461
		// (get) Token: 0x06001CCF RID: 7375 RVA: 0x0008CD72 File Offset: 0x0008AF72
		// (set) Token: 0x06001CD0 RID: 7376 RVA: 0x0008CD7A File Offset: 0x0008AF7A
		public byte[] ContentBytes { get; set; }

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.SendBytes" />
		// Token: 0x170005B6 RID: 1462
		// (get) Token: 0x06001CD1 RID: 7377 RVA: 0x0008CD83 File Offset: 0x0008AF83
		// (set) Token: 0x06001CD2 RID: 7378 RVA: 0x0008CD8B File Offset: 0x0008AF8B
		public byte[] SendBytes { get; set; }
	}
}
